import {createRouter, createWebHashHistory, RouterOptions} from "vue-router";
import {getToken} from "@/utils/token";

//@ts-ignore
const isAuthenticated=()=>{
    let token = getToken();
    console.log('index.ts-isAuthenticated-token',token)
}
const router = createRouter(<RouterOptions>{
    routes: [
        {
            path: '/',

            redirect: '/login'
        },
        {
            path: '/login',
            name: 'login',
            component: () => import('@/views/Login/index.vue')
        },
        {
            path: '/home',
            // beforeEnter:isAuthenticated,
            name: 'home',
            component: () => import('@/views/Home/index.vue')
        },

    ],
    history: createWebHashHistory()
})
export default router
